#include <stdio.h>
#include <stdlib.h>

int main(int argc, char ** argv)
{
	if(argc != 3)
		return 1;

	int width = atoi(argv[1]);
	int height = atoi(argv[2]);

	int nb_hor_structural_springs = (width - 1) * height;
	int nb_vert_structural_springs = (height - 1) * width;
	int nb_structural_springs = nb_hor_structural_springs + nb_vert_structural_springs;
	int nb_hor_flexion_springs = (width - 2) * height;
	int nb_vert_flexion_springs = (height - 2) * width;
	int nb_flexion_springs = nb_hor_flexion_springs + nb_vert_flexion_springs;
	int nb_shear_springs = 2 * (width - 1) * (height - 1);
	int nb_springs = nb_structural_springs + nb_flexion_springs + nb_shear_springs;

	
	printf("nb_hor_structural_springs = %d [%d -> %d]\n", nb_hor_structural_springs, 0, nb_hor_structural_springs - 1);
	printf("nb_vert_structural_springs = %d [%d -> %d]\n", nb_vert_structural_springs, nb_hor_structural_springs, nb_hor_structural_springs + nb_vert_structural_springs - 1);
	printf("nb_hor_flexion_springs = %d [%d -> %d]\n", nb_hor_flexion_springs, nb_hor_structural_springs + nb_vert_structural_springs, nb_hor_structural_springs + nb_vert_structural_springs + nb_hor_flexion_springs - 1);
	printf("nb_vert_flexion_springs = %d [%d -> %d]\n", nb_vert_flexion_springs, nb_hor_structural_springs + nb_vert_structural_springs + nb_hor_flexion_springs, nb_hor_structural_springs + nb_vert_structural_springs + nb_hor_flexion_springs + nb_vert_flexion_springs - 1);
	printf("nb_shear_springs = %d [%d -> %d]\n", nb_shear_springs, nb_hor_structural_springs + nb_vert_structural_springs + nb_hor_flexion_springs + nb_vert_flexion_springs, nb_hor_structural_springs + nb_vert_structural_springs + nb_hor_flexion_springs + nb_vert_flexion_springs + nb_shear_springs - 1);
	printf("nb_springs = %d\n", nb_springs);
	return 0;
}
